package org.ptraco.pt.facade
{
	
	import org.ptraco.pt.login.view.LoginPanelMediator;
	import org.puremvc.as3.patterns.facade.Facade;

	public class ApplicationFacade extends Facade
	{
		public static const APP_STARTUP: String = "appStartup";
		
		/**
		*Added By : Skulkarni
		*Date : 04 May 2009
		*Desc : Application ref. required for view ref. 
		*/
		public var PTApplication:PT;
							
		public static function getInstance(): ApplicationFacade
		{
			if (instance == null) instance = new ApplicationFacade();
			return instance as ApplicationFacade;
		}
	
		override protected function initializeController() : void 
		{
			super.initializeController();		
			//registerCommand( APP_STARTUP, ApplicationStartupCommand);
		}
	
		public function startup( application:PT ):void
		{
			PTApplication =  application;
			this.sendNotification( ApplicationFacade.APP_STARTUP, application );
			this.registerMediator( new LoginPanelMediator( application.loginBox));
			
		}
		
		
			
		}
		
	 }
			
